﻿// <copyright file="IOperation.cs" company="EDD Solutions Ltd.">
// Copyright (c) EDD Solutions Ltd. 2010.
//
// This file is part of Sharepoint.Manipulator.Net.
//
// Sharepoint.Manipulator.Net is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Sharepoint.Manipulator.Net is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Sharepoint.Manipulator.Net.  If not, see http://www.gnu.org/licenses/.
// </copyright>
// <author>$Author$</author>
// <date>$Date$</date>
// <revision>$Revision$</revision>
namespace Sharepoint.Manipulator.Net
{
    /// <summary>
    /// Interface describing operation funcitonality
    /// </summary>
    public interface IOperation
    {
        /// <summary>
        /// Gets or sets the response message after a run.
        /// </summary>
        string RunResponse { get; set; }

        /// <summary>
        /// Run the operation.
        /// </summary>
        /// <returns>an object containing the results.</returns>
        object Run();

        /// <summary>
        /// Returns the usage information for the operation.
        /// </summary>
        /// <returns>a string of instructions</returns>
        string Usage();

        /// <summary>
        /// Parse the parameters
        /// </summary>
        /// <param name="args">the list of parameters</param>
        void ParseParameters(string[] args);

        /// <summary>
        /// Confirm that the operation can be carried out of the location
        /// </summary>
        void ValidateLocation();
    }
}
